<include file="Common:header"/>
<style>
.button{
	border-radius: 4px;
	padding: 0;
	height: 40px;
	line-height: 42px;
	font-size: 16px;
	margin-bottom: 10px;
	background-color:#eb7b3f;
	text-align:center;
	margin-top:10px;color:#f6f6f6

}
</style>
<body>
	<div class="bannerbaowei">
		<div class="dajianxi"></div>
		<div class="tit1h4391">选择付费会员级别</div>
	</div>
	<div class="page">
		<div class="main">
			<div class="txt1pa20">
				<div class="txt1c33">
					<div class="pa10cb">您的基本信息</div>
					
						<div class="txt1c6" >
							<span class="fricon" ><b>·手机号&nbsp;:&nbsp;<{$member_info['mobile']}></b></span>
						</div>
					
						<div class="txt1c6">
							<span class="fricon" ><b>·昵称&nbsp;:&nbsp;<{$member_info['username']}></b></span>
						</div>
						
					<if condition="!empty($member_info['higher_info'])">
						<div class="txt1c6" >
							<span class="fricon"><b>·介绍人&nbsp;:&nbsp;<{$member_info['higher_info']['username']}></b></span>
						</div>
						
					</if>
				</div>	
			</div>			
			<div class="txt1pa20">
				<div class="txt1c33">
					<if condition="count($level) gt 1">
					<div class="pa10cb">选择服务级别,点击进入支付</div>当再次购买时会在之前的会员期限上延长会员期限
					</if>
					<?php foreach ($level as $row): ?>
						<div class="txt1c6" onclick="paytype(<{$row.level_id}>)" style="background:#69d0fe";>
							<span class="fricon"><b><font size="3" color="f3eb6f"><{$row.level_name}></font></b><br /><{$row['price']}><br /><{$row.note}></span>
						</div>
					<?php endforeach ?>
					<if condition="($member_info['level'] eq 0)">
						<!-- <div class="button" onclick="paytype(<{$row.level_id}>)">点击升级</div>	 -->
					</if>
				</div>
			</div>
			<!-- <div class="txt1bn">· 服务说明</div> -->
		</div>
	</div>
	<include file="Common:menu"/>
</body>
</html>
<script type="text/javascript">
	function upgrade(level){
		$.get("<{:U('User/paytype')}>",{'id':level},function(data){
			layer.open({
				type: 1,
				title:'支付方式',
				shadeClose: true,
				content:data
			});
		})
	}
	

	function paytype(level) {
			var paytype = 'wxpay';

			$.ajax({
			   type: "POST",
			   url: "<{:U('Home/Pay/Index')}>",
			   data: {level:level, pay_type:paytype},
			   success: function(msg){
				 if(msg.status == '1'){
					 window.location.href = msg.url;
				 }else{
					layer.open({
						content:msg.info
					});
				 }
			   }
			});
	}



</script>